import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import {getDicdataByType} from "@/api/user/dicdata";
import { changeMem,AutoFormat,isEmpty,resetForm,selectLabel,amtvalueFormater,parseMoney,formatCurrency,praseStrEmpty,download,addDateRange,parseTime } from '@/utiles/smallgod'
import '@/assets/style/global.css'
import Pagination from "@/components/Pagination";
import Router from "vue-router";
import hasPermission from '@/utiles/hasPermission'
import * as echarts from 'echarts'
Vue.use(hasPermission)
Vue.config.productionTip = true
Vue.use(Element)
Vue.use(Router)
//全局方法挂载

Vue.prototype.isEmpty=isEmpty
Vue.prototype.resetForm=resetForm
Vue.prototype.selectLabel=selectLabel
Vue.prototype.getDicdataByType=getDicdataByType
Vue.prototype.changeMem=changeMem
Vue.prototype.AutoFormat=AutoFormat
Vue.prototype.amtvalueFormater=amtvalueFormater
Vue.prototype.parseMoney=parseMoney
Vue.prototype.formatCurrency=formatCurrency
Vue.prototype.praseStrEmpty=praseStrEmpty
Vue.prototype.download=download
Vue.prototype.addDateRange=addDateRange
Vue.prototype.parseTime=parseTime



Vue.prototype.$echarts = echarts
Vue.prototype.msgSuccess=function (msg) {
  this.$message({showClose:true,message:msg,type:"success"})
}
Vue.prototype.msgError=function (msg) {
  this.$message({showClose:true,message:msg,type:"error"})
}
Vue.prototype.msgInfo=function (msg) {
  this.$message.info(msg);
}


// 全局组件挂载
Vue.component('Pagination', Pagination)

new Vue({
  el: '#app',
  router,
  render: h => h(App),
}).$mount('#app')
